import 'animate.css'
import { createApp, Directive } from 'vue'
import App from './App.vue'
import router from './router'
import 'ant-design-vue/dist/reset.css'
import Antd from 'ant-design-vue'
import './assets/main.css'
import i18n from './locales'
import * as directives from './directives'
import { createPinia } from 'pinia'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'

const pinia = createPinia()
const app = createApp(App)
app.use(router)
app.use(Antd)
app.use(i18n)
app.use(pinia)
pinia.use(piniaPluginPersistedstate)

Object.keys(directives).forEach(key => {
  app.directive(key, (directives as { [key: string]: Directive })[key])
})
app.mount('#app')
